package com.free.mini.gateway.constants;

public interface GatewayConstant {

    /**
     * 缓存key
     */
    String CACHE_GATEWAY_CONTEXT = "CACHE_GATEWAY_CONTEXT_ATTRIBUTE";
    /**
     * 平台
     */
    String PLATFORM = "platform";
    /**
     * 需要加密
     */
    String NEED_ENCRYPTION = "need-encryption";

    String APP_VERSION_CODE = "version-code";
    String TIMESTAMP = "timestamp";
    /**
     * 随机数
     */
    String NONCE = "nonce";

    String CONTENT_TYPE = "Content-Type";

    String CONTENT_LENGTH = "Content-Length";

    String TRANSFER_ENCODING = "Transfer-Encoding";

    String TOKEN = "accessToken";

    String COMMA_SYMBOL = ",";

    String CHUNKED = "chunked";

    String BOUNDARY = "boundary";
    String BODY = "body";
    String DATA = "data";
    String DECODE_DATA = "decodeData";
    String ENCODE_DATA = "encodeData";
    String LINE_END = "\r\n";
    String AND = "&";
    String EQUALS = "=";
    String CONTENT_DISPOSITION = "Content-Disposition: form-data; name=\"%s\"";
    String NANOPAY_REQUEST_DECODE_VERIFY = "nanopayRequestDecodeVerified";

    String REQUEST_DECODE_1 = "1";
    String REQUEST_DECODE_0 = "0";
    String RESPONSE_ENCODE_1 = "1";
    String RESPONSE_ENCODE_0 = "0";


    String PLAT = "plat";
    int PLAT_1 = 1;
    int PLAT_2 = 2;
    int PLAT_3 = 3;
    String NEEDENCRYPTION = "needEncryption";



    //String PLATFORM_ANDROID = "android";// android
    //String PLATFORM_IOS = "ios";// ios
    //String PLATFORM_H5 = "h5";// h5

    String UTF_8 = "UTF-8";

    /**
     * 登录token
     */
    String USER_ID = "userId";
    String ACCESS_TOKEN = "accessToken";
    String ACCOUNT_TYPE_MOBILE = "mobile";
    String ACCOUNT_TYPE_EMAIL = "email";
    String ACCOUNT = "account";
    String ACCOUNT_TYPE = "accountType";
    String IP = "ip";
    String SDK_TOKEN_PREFIX = "sdk_token:";
    String SDK_TOKEN_PERIOD_PREFIX = "sdk_token:valid:period:";
    String SDK_TOKEN_PERIOD_MARK_PREFIX = "sdk_token:valid:period:mark:";
    String ACCOUNT_TOKEN_PREFIX = "account_token:";
    String ACCOUNT_TOKEN_PERIOD_PREFIX = "account_token:valid:period:";
    String ACCOUNT_TOKEN_PERIOD_MARK_PREFIX = "account_token:valid:period:mark:";
    String SDK_USERID_PREFIX = "sdk_userid:";
    String ACCOUNT_USERID_PREFIX = "account_userid:";
    int TTL_1M = 60;
    int TTL_1H = 60 * TTL_1M;
    int TTL_1D = 24 * TTL_1H;
//    String SDK_TOKEN_PREFIX = "nanopay:sdk_token:";
//    String ACCOUNT_TOKEN_PREFIX = "nanopay:account_token:";
//    String SDK_USERID_PREFIX = "nanopay:sdk_userid:";
//    String ACCOUNT_USERID_PREFIX = "nanopay:account_userid:";

    /**
     * 签名
     */
    String SIGN = "sign";

    /**
     * 数组时的key
     */
    String ITEMS_FIELD = "items";
}